package com.insigma.business.qrcode.soldier.util;



import cn.hutool.core.date.DateUtil;
import com.insigma.business.qrcode.common.dto.BaseBizDO;
import com.insigma.business.qrcode.common.vo.BaseInsertRequest;
import com.insigma.business.qrcode.common.vo.BaseUpdateRequest;

import java.util.Date;


public class RequestSetUtils {

    public static void setCreatorInfo(BaseBizDO bizDO, BaseInsertRequest<String> request) {
        bizDO.setCreatorType(request.getCreatorType());
        bizDO.setCreateDatetime(new Date());
        bizDO.setCreatorId(request.getCreatorId());
    }

    public static void setModifierInfo(BaseBizDO bizDO, BaseUpdateRequest<String, String> request) {
        bizDO.setModifierType(request.getModifierType());
        bizDO.setModifierId(request.getModifierId());
        bizDO.setModifyDatetime(new Date());
    }

    public static void main(String[] args) {
        int month = DateUtil.month(new Date());
        System.out.println(month);
    }
}
